package cn.com.chengmandian.bike.service.impl;

import cn.com.chengmandian.bike.mapper.EbSettingArticleMapper;
import cn.com.chengmandian.bike.model.EbSettingArticle;
import cn.com.chengmandian.bike.service.IEbSettingArticleService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author AutoGenerator
 * @since 2021-12-21
 */
@Service
public class EbSettingArticleServiceImpl extends ServiceImpl<EbSettingArticleMapper, EbSettingArticle> implements IEbSettingArticleService {

    @Override
    public EbSettingArticle getByType(Integer type) {
        return this.getOne(new LambdaQueryWrapper<EbSettingArticle>().eq(EbSettingArticle::getType, type).last("limit 1"));
    }
}
